/**
 * 
 */
package bancosys.tec.services.implementor.type;

import java.util.List;

import jmine.tec.services.annotations.Input;
import jmine.tec.services.annotations.Output;
import jmine.tec.services.annotations.ServiceImplementor;
import jmine.tec.services.api.ActionsEnum;
import junit.framework.Assert;

@ServiceImplementor(action = ActionsEnum.INCLUIR)
public class GenericClass<E> extends Assert {

    private boolean executed;

    private E e;

    private List<E> list;

    private List<? extends E> wildList;

    private E[] array;

    @Input
    public void setInstance(E e) {
        this.e = e;
    }

    @Input
    public void setList(List<E> list) {
        this.list = list;
    }

    @Input
    public void setWildList(List<? extends E> list) {
        this.wildList = list;
    }

    @Output(propertyName = "aa")
    public E getInstance() {
        return this.e;
    }

    public void setArray(E[] array) {
        this.array = array;
    }

    public void execute() {
        assertNotNull(this.e);
        assertNotNull(this.list);
        assertFalse(this.list.isEmpty());
        assertFalse(this.wildList.isEmpty());
        assertNotNull(this.array);
    }

    /**
     * @return the executed
     */
    public boolean hasExecuted() {
        return this.executed;
    }

    /**
     * @param executed the executed to set
     */
    public void setExecuted() {
        this.executed = true;
    }

}